<?php
include_once('admin-load.php');

include_once 'header.php';

$id = isset($_GET['tracking_id']) ? intval($_GET['tracking_id']) : 0;

$tracking = $dbna->get_row("SELECT * FROM location lo, tracking_status ts,  tracking tr WHERE tr.id = $id");

if (!is_object($tracking)) {
    //redirect(BASE_URL. 'admin/tracking.php');
}
?>
<div id="main_content">
    <div id="content">
        <div class="container">
            <h5>Tracking Detail</h5>
            <div class="back-link">
                <a href="<?php echo BASE_URL ?>admin/tracking.php">&laquo;Back</a>
            </div>
        </div>
        <div class="view-tracking">
            <table>
                <tbody>
                    <tr>
                        <td colspan="2"><b>.:Shipment</b></td>

                    </tr>
                    <tr>
                    <tr>
                        <td class="label">Tracking Number:</td>
                        <td class="value"><?php echo $tracking->bill_id ?></td>
                    </tr>
                    <tr>
                        <td>Shipping On</td>
                        <td class="value"><?php echo $tracking->shipped_on ?></td>
                    </tr>
                    <tr>
                        <td>Destination:</td>
                        <td><?php echo $tracking->destination ?></td>
                    </tr>
                    <tr>
                        <td>Delivered date</td>
                        <td>7777</td>
                    </tr>
                    <tr>
                        <td>Delivered time</td>
                        <td>7777</td>
                    </tr>
                    <tr>
                        <td colspan="2"><b>.:Detail</b></td>

                    </tr>
                    <tr>
                        <td>Description</td>
                        <td><?php echo $tracking->description?></td>
                    </tr>
                    <tr>
                        <td>Date:</td>
                        <td>7777</td>
                    </tr>
                    <tr>
                        <td>Time:</td>
                        <td>7777</td>
                    </tr>
                    <tr>
                        <td>Status:</td>
                        <td><?php echo $tracking->status ?></td>
                    </tr>
                    <tr>
                        <td>Location:</td>
                        <td><?php echo $tracking->location ?></td>
                    </tr>
                    
                    <tr>
                        <td>Sign by:</td>
                        <td><?php echo $tracking->sign_by ?></td>
                    </tr>
                    <tr>
                        <td>Weight</td>
                        <td><?php echo $tracking->weight ?></td>
                    </tr>
                    <tr>
                        <td>Piece:</td>
                        <td><?php echo $tracking->piece ?></td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div><!-- end content -->
</div><!-- end main content -->
<?php
include_once 'footer.php';
?>